<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript" src="../../plugin/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="../../plugin/jquery/validation/jquery.validate.min.js"></script>
	<script type="text/javascript" src="../../plugin/jquery/validation/messages_zh.min.js"></script>
	<style type="text/css">
		label.error {display: none;color:red;}
	</style>
</head>
<body style="padding: 2px;">
    <form id="form1" method="post">
    	<table width="560" border="0" cellpadding="4">
    		<tr>
    			<td align="right">单行文本框：</td>
    			<td>
    				<input type="text" name="f1" required="true"/>
    			</td>
    		</tr>
    		<tr>
    			<td align="right">单选框：</td>
    			<td>
   					<input type="radio" id="f21" name="f2" required="true" value="1"/>选项
   					<input type="radio" id="f22" name="f2" value="2"/>选项
   					<label for="f2" class="error">必选</label>
    			</td>
    		</tr>
    		<tr>
    			<td align="right">复选框：</td>
    			<td>
    				<input type="checkbox" name="f3" required="true" value="1"/>选项
    				<input type="checkbox" name="f3" value="2"/>选项
    				<input type="checkbox" name="f3" value="3"/>选项
    				<label for="f3" class="error">必选</label>
    			</td>
    		</tr>
    		<tr>
    			<td align="right">下拉框：</td>
    			<td>
    				<select  name="f4" required="true" style="width:153px;">
    					<option></option>
    					<option value="Java">Java</option>
    					<option value="C#">C#</option>
    					<option value="PHP">PHP</option>
    				</select>
    			</td>
    		</tr>
    		<tr>
    			<td align="right">多行文本框：</td>
    			<td>
    				<textarea name="f5" cols="36" rows="4" required="true"></textarea>
    			</td>
    		</tr>
    		<tr>
    			<td colspan="2">
    				<input type="submit" value="提交"/>
    			</td>
    		</tr>
    	</table>
    </form>
</body>
<script type="text/javascript">
$(document).ready(function() {
	$("#form1").validate();
});
</script>
</html>